{% extends 'base.html.twig' %}
{% block body_bar %}
    <h5>{{ dry_translation('list') }}</h5>
    <div class="ibox-tools">
        <a class="btn btn-outline btn-info" href="{{ path("menu_new") }}" data-route="menu_new">{{ dry_translation('new') }}</a>
        <a class="btn btn-outline btn-info" href="{{ path("menu_update_data_sort") }}" data-route="menu_update_data_sort">{{ dry_translation('menuUpdateDataSort') }}</a>
    </div>
{% endblock %}
{% block body %}
    <table class="table table-striped">
        <thead>
            <tr>
                <th>{{ dry_translation('Menu.id') }}</th>
                <th>{{ dry_translation('Menu.dryParent') }}</th>
                <th>{{ dry_translation('Menu.dryGrade') }}</th>
                <th>{{ dry_translation('Menu.dryIcon') }}</th>
                <th>{{ dry_translation('Menu.dryName') }}</th>
                <th>{{ dry_translation('Menu.dryRouteName') }}</th>
                <th>{{ dry_translation('Menu.dryUrl') }}</th>
                <th>{{ dry_translation('Menu.dryTarget') }}</th>
                <th>{{ dry_translation('Menu.dryStatus') }}</th>
                <th>{{ dry_translation('Menu.dryNote') }}</th>
                <th>{{ dry_translation('Menu.drySort') }}</th>
                <th>{{ dry_translation('Menu.dryAddtime') }}</th>
                <th>{{ dry_translation('action') }}</th>
            </tr>
        </thead>
        <tbody>
            {% for menu in menus %}
            <tr>
                <td>{{ menu.id }}</td>
                <td>{{ menu.dryParent }}</td>
                <td>{{ menu.dryGrade }}</td>
                <td>{{ menu.dryIcon }}</td>
                <td>{{ call_method('gradeShow', menu.dryName, menu.dryGrade)|raw }}</td>
                <td>{{ menu.dryRouteName }}</td>
                <td>{{ call_method('detailShow', menu.dryUrl)|raw }}</td>
                <td>{{ dryTargetArray[menu.dryTarget] }}</td>
                <td>{{ call_method('statusShow', dryStatusArray, menu.dryStatus)|raw }}</td>
                <td>{{ menu.dryNote }}</td>
                <td>{{ menu.drySort }}</td>
                <td>{{ menu.dryAddtimeString }}</td>
                <td>
                    <div class="btn-group">
                        <a class="btn btn-primary" href="{{ dry_path('menu_show', menu.id) }}" data-route="menu_show">{{ dry_translation('show') }}</a>
                        <a class="btn btn-primary" href="{{ dry_path('menu_edit', menu.id) }}" data-route="menu_edit">{{ dry_translation('edit') }}</a>
                    </div>
                </td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
    <div class="text-center">{{ pageCode|raw }}</div>
{% endblock %}
